package cn.xy.base.server.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * redisson配置
 *
 *  @author xy
 */
@Data
@Component
public class RedissonConfig {
    @Value("${redisson.threads}")
    private int threads;

    @Value("${redisson.nettyThreads}")
    private int nettyThreads;

    @Value("${redisson.transportMode}")
    private String transportMode;

    @Value("${redisson.singleServerConfig.address}")
    private String address;

    @Value("${redisson.singleServerConfig.username}")
    private String username;

    @Value("${redisson.singleServerConfig.password}")
    private String password;

    @Value("${redisson.singleServerConfig.database}")
    private int database;

    @Value("${redisson.singleServerConfig.clientName}")
    private String clientName;

    @Value("${redisson.singleServerConfig.sslKeystore}")
    private String sslKeystore;

    @Value("${redisson.singleServerConfig.sslKeystorePassword}")
    private String sslKeystorePassword;

    @Value("${redisson.singleServerConfig.sslTruststore}")
    private String sslTruststore;

    @Value("${redisson.singleServerConfig.sslTruststorePassword}")
    private String sslTruststorePassword;

    @Value("${redisson.singleServerConfig.sslEnabled}")
    private boolean sslEnabled;

    @Value("${redisson.singleServerConfig.sslEnableEndpointIdentification}")
    private boolean sslEnableEndpointIdentification;

    @Value("${redisson.singleServerConfig.idleConnectionTimeout}")
    private int idleConnectionTimeout;

    @Value("${redisson.singleServerConfig.connectTimeout}")
    private int connectTimeout;

    @Value("${redisson.singleServerConfig.timeout}")
    private int timeout;

    @Value("${redisson.singleServerConfig.retryAttempts}")
    private int retryAttempts;

    @Value("${redisson.singleServerConfig.retryInterval}")
    private int retryInterval;


    @Value("${redisson.singleServerConfig.subscriptionsPerConnection}")
    private int subscriptionsPerConnection;

    @Value("${redisson.singleServerConfig.subscriptionConnectionMinimumIdleSize}")
    private int subscriptionConnectionMinimumIdleSize;

    @Value("${redisson.singleServerConfig.subscriptionConnectionPoolSize}")
    private int subscriptionConnectionPoolSize;

    @Value("${redisson.singleServerConfig.connectionMinimumIdleSize}")
    private int connectionMinimumIdleSize;

    @Value("${redisson.singleServerConfig.connectionPoolSize}")
    private int connectionPoolSize;

    @Value("${redisson.singleServerConfig.dnsMonitoringInterval}")
    private int dnsMonitoringInterval;

}
